<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link href="__STATIC__/admin/assets/css/bootstrap.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="__STATIC__/admin/css/style.css"/>
  <link href="__STATIC__/admin/assets/css/codemirror.css" rel="stylesheet">
  <link rel="stylesheet" href="__STATIC__/admin/assets/css/ace.min.css" />
  <link rel="stylesheet" href="__STATIC__/admin/font/css/font-awesome.min.css" />
  <!--[if lte IE 8]>
  <link rel="stylesheet" href="__STATIC__/admin/assets/css/ace-ie.min.css" />
  <![endif]-->
  <script src="__STATIC__/admin/js/jquery-1.9.1.min.js"></script>
  <script src="__STATIC__/admin/assets/js/bootstrap.min.js"></script>
  <script src="__STATIC__/admin/assets/js/typeahead-bs2.min.js"></script>
  <script src="__STATIC__/admin/assets/js/jquery.dataTables.min.js"></script>
  <script src="__STATIC__/admin/assets/js/jquery.dataTables.bootstrap.js"></script>
  <script src="__STATIC__/admin/assets/layer/layer.js" type="text/javascript" ></script>
  <script src="__STATIC__/admin/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="__STATIC__/admin/js/curd.js"></script>
  <title>管理权限</title>
</head>

<body>
<div class="margin clearfix">
  <div class="border clearfix">
       <span class="l_f">
        <a href="javascript:;" data-url="{:url('create')}" data-type="full" id="add"   class="btn btn-warning" title="添加权限"><i class="fa fa-plus"></i> 添加角色</a>
        <a href="javascript:;" data-url="{:url('delete')}" id="patch_delete" class="btn btn-danger"><i class="fa fa-trash"></i> 批量删除</a>
       </span>
    <span class="r_f">共：<b>{:count($list)}</b>条</span>
  </div>
  <div class="compete_list">
    <table id="sample-table-1" class="table table-striped table-bordered table-hover">
      <thead>
      <tr>
        <th class="center"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
        <th>角色名称</th>
        <th>用户列表</th>
        <th>描述</th>
        <th class="hidden-480">描述</th>
        <th class="hidden-480">操作</th>
      </tr>
      </thead>
      <tbody>
      {foreach $list as $v}
      <tr data-id="{$v.id}">

<!--        <td class="center"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>-->
          {if ($v.id != 1)}
          <td class="center"><label><input type="checkbox" class="ace row_check" value="{$v.id}"><span class="lbl"></span></label></td>
          {else /}
          <td class="center">不可删除</td>
          {/if}

        <td>{$v.role_name}</td>

        <td>{:implode(',',array_column($v.users, 'username'))}</td>

        <td class="hidden-480">{$v.desc}</td>
        <td>
            {if ($v.id != 1)}
          <a title="编辑"   data-url="{:url('edit', ['id'=>$v.id])}" data-type="full" href="javascript:;"  class="btn btn-xs btn-info edit" ><i class="fa fa-edit bigger-120"></i></a>
          <a title="删除" data-url="{:url('delete', ['id'=>$v.id])}" href="javascript:;" class="btn btn-xs btn-warning delete" ><i class="fa fa-trash  bigger-120"></i></a>
            {/if}
        </td>
      </tr>
      {/foreach}
      </tbody>
    </table>
  </div>
</div>


</body>
</html>

